package com.lyrcsoft.rxjava1x.operators.filter;

import com.lyrcsoft.rxjava1x.dao.DataUtils;
import com.lyrcsoft.rxjava1x.entity.Community;
import rx.Observable;
import rx.functions.Action1;

/**
 * @author fujc2dev@126.com
 * @date 2024-11-21
 */
public class skip {

    /**
     * skip(int)让我们可以忽略Observable发射的前n项数据。
     * @param args
     */
    public static void main(String[] args) {
        Observable.from(DataUtils.getCommunityList())
                .skip(1)
                .subscribe(new Action1<Community>() {
                    @Override
                    public void call(Community community) {
                        System.out.println(community.getName());
                    }
                });

    }
}
